home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Entertainment / MacMud / Mud 4.0 / MacMud.h < prev    next >
Encoding:
Text File  |  1993-03-22  |  2.3 KB  |  100 lines  |  [TEXT/MPS ]

  1.  
  2. //    MacMud.h
  3.  
  4. #ifndef _MACMUD
  5. #define _MACMUD
  6.  
  7. #define CREATOR            'MMud'
  8. #define FTYPE_TEXT        'TEXT'
  9.  
  10. // The menubar resources
  11. enum {
  12.     MAINMENUBAR    = 128,
  13.  
  14.     M_APPLE                    = 128,
  15.         M_APPLE_ABOUT        = 1,
  16.         M_APPLE_PREFERENCES = 2,
  17.     M_FILE                    = 129,
  18.         M_FILE_NEW            = 1,
  19.         M_FILE_QUIT            = 3,
  20.     M_EDIT                    = 130,
  21.         M_EDIT_UNDO            = 1,
  22.         M_EDIT_CUT            = 3,
  23.         M_EDIT_COPY            = 4,
  24.         M_EDIT_PASTE        = 5,
  25.         M_EDIT_CLEAR        = 6,
  26.         M_EDIT_SELECTALL    = 8,
  27.     M_MISC                    = 131,
  28.         M_MISC_STARTUP        = 1,
  29.         M_MISC_SHUTDOWN        = 2,
  30.         M_MISC_SHOWMSG        = 4
  31. };
  32.  
  33. enum {
  34.     ALERT_YES        =    1,
  35.     ALERT_NO        =    2,
  36.     ALERT_CANCEL    =    3
  37. };
  38.  
  39. extern Boolean            gRunning;
  40. extern Boolean            gProgramDone;
  41. extern THPrint            gPrintHdl;
  42. extern short            gDefaultFont;
  43. extern short            gDefaultSize;
  44. extern short            gDefaultFace;
  45. extern short            gDefaultJust;
  46. extern Boolean            gCancelOp;
  47. extern FSSpec            gLastFSSpec;
  48.  
  49. #define kSysEnvironsVersion     1
  50.  
  51. #define kMinHeap                (1024 * 1024)    
  52. #define kMinSpace                (512 * 1024)
  53.  
  54. #define kExtremeNeg                 -32768
  55. #define kExtremePos                32767 - 1
  56. #define kExtremeLong            0x7fffffff
  57.  
  58. #define rUserAlert                128
  59. #define sStdStrings                128
  60. #define eStandardErr            1
  61. #define eWrongMachine            2
  62. #define eSmallSize                3
  63. #define eNoXtc                    4
  64. #define eNoMemory                5
  65. #define eNoPrinter                6
  66. #define eFailedToStart            7
  67.  
  68. #define rSaveAlert                129
  69. #define rMsgAlert                130
  70. #define rShutdownAlert            133
  71.  
  72. #define kDebugView                128
  73. #define kConsoleView            129
  74.  
  75. #define kAboutView                 500        // View id for about box
  76. #define kSplashView                501        // View id for splash screen
  77.  
  78. void _DataInit();                        // Standard routine
  79.  
  80. void AlertUser(short error, short message);
  81. pascal void FatalError(short error, short message);
  82. void AlertMsg(ConstStr255Param theMsg, ConstStr255Param theParam);
  83.  
  84. Boolean DoStandardGetFile(SFTypeList typeList, short numTypes);
  85. Boolean DoStandardPutFile(ConstStr255Param prompt, ConstStr255Param defaultName);
  86.  
  87. Boolean RunMudlib(void);
  88.  
  89. void DoCloseAllWindows(void);
  90.  
  91. pascal Boolean XtcMain(UI_ViewPtr view, UI_Action *action);
  92. pascal Boolean XtcAboutBox(UI_ViewPtr view, UI_Action *action);
  93. pascal Boolean XtcSplashScreen(UI_ViewPtr view, UI_Action *action);
  94.  
  95. pascal Boolean XtcDebug(UI_ViewPtr view, UI_Action *action);
  96. pascal Boolean XtcConsole(UI_ViewPtr view, UI_Action *action);
  97.  
  98. extern pascal Boolean XtcDebug(UI_ViewPtr view, UI_Action *action);
  99.  
  100. #endif